<?php
namespace app\common\library;

use traits\model\SoftDelete;


class Model extends \think\Model
{

    use SoftDelete;

    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';
    protected $deleteTime = 'delete_time';
    protected $autoWriteTimestamp = 'int';

    /**
     * 全局事件拦截
     */
    protected static function init()
    {
        // 更新前
        self::beforeWrite(function ($callback) {

        });

        // 更新后
        self::afterWrite(function ($callback) {

        });
    }

}